Convert between binary, decimal, hexadecimal, and octal number systems with step-by-step explanations. Perfect for students, programmers, and digital enthusiasts.
The binary number system uses only two digits: 0 and 1. Each digit's position represents a power of 2, starting from the rightmost digit (2^0 = 1).
For example, the binary number 101 represents:
So 101 in binary equals 5 in decimal.
The decimal system is our standard number system, using ten digits (0-9). Each position represents a power of 10.
For example, the decimal number 123 represents:
Adding these values: 100 + 20 + 3 = 123
The hexadecimal system uses 16 digits: 0-9 and A-F (where A=10, B=11, ..., F=15). Each position represents a power of 16.
For example, the hexadecimal number 1A represents:
So 1A in hexadecimal equals 26 in decimal.
The octal system uses 8 digits (0-7). Each position represents a power of 8.
For example, the octal number 17 represents:
So 17 in octal equals 15 in decimal.
Binary numbers are fundamental to computing because electronic circuits can easily represent two states: on (1) and off (0). Inside a computer, all data—whether text, images, videos, or programs—is ultimately stored and processed as binary digits (bits).
Binary is the native language of digital logic and forms the basis for all digital systems.
To convert a binary number to decimal:
For example, for binary 1101:
8 + 4 + 0 + 1 = 13 (decimal)
Hexadecimal is often used as a more human-friendly representation of binary data because:
Programmers commonly use hexadecimal for memory addresses, color codes, and debugging binary data.
Unsigned binary represents only positive numbers or zero. All bits contribute to the magnitude of the number.
Signed binary can represent both positive and negative numbers. The most common representation is two's complement, where the leftmost bit indicates the sign (0 for positive, 1 for negative).
For example, in an 8-bit signed system:
This converter handles unsigned binary numbers by default.
Common mistakes include:
Using this calculator can help avoid these common errors.